#include <bits/stdc++.h>
#define sc(x) scanf("%lld", &(x))
#define pr(x) printf("%lld\n", (x))
#define rep(i, l, r) for (int i = l; i <= r; ++i)
using namespace std;
typedef long long ll;
const int N = 1e5 + 7;
const int mod = 1e9 + 7;
signed main() {
    int n;
    cin >> n;
    long double ans = 0, x;
    rep(i, 1, n) {
        cin >> x;
        int r = n - i + 1;
        ans += x * i * r;
    }
    printf("%.2Lf\n", ans);
    return 0;
}